1# Copyright (c) 2012 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 394 unchanged lines hidden (view full) --- 403 404 code('%module(package="m5.internal") param_$cls') 405 code() 406 code('%{') 407 code('#include "params/$cls.hh"') 408 for param in params: 409 param.cxx_predecls(code) 410 cls.export_method_cxx_predecls(code) |
411 code('''\ 412/** 413 * This is a workaround for bug in swig. Prior to gcc 4.6.1 the STL 414 * headers like vector, string, etc. used to automatically pull in 415 * the cstddef header but starting with gcc 4.6.1 they no longer do. 416 * This leads to swig generated a file that does not compile so we 417 * explicitly include cstddef. Additionally, including version 2.0.4, 418 * swig uses ptrdiff_t without the std:: namespace prefix which is 419 * required with gcc 4.6.1. We explicitly provide access to it. 420 */ 421#include <cstddef> 422using std::ptrdiff_t; 423''') |
424 code('%}') 425 code() 426 427 for param in params: 428 param.swig_predecls(code) 429 cls.export_method_swig_predecls(code) 430 431 code() --- 727 unchanged lines hidden --- |