Read about our upcoming Code of Conduct on this issue

Commit beaa35fa authored by Armin Rigo's avatar Armin Rigo
Browse files

merge heads

......@@ -10,8 +10,14 @@ PyPy supports only being translated as a 32bit program, even on
64bit Windows. See at the end of this page for what is missing
for a full 64bit translation.
To build pypy-c you need a C compiler. Microsoft Visual Studio is
preferred, but can also use the mingw32 port of gcc.
To build pypy-c you need a working python environment, and a C compiler.
It is possible to translate with a CPython 2.6 or later, but this is not
the preferred way, because it will take a lot longer to run – depending
on your architecture, between two and three times as long. So head to
`our downloads`_ and get the latest stable version.
Microsoft Visual Studio is preferred as a compiler, but there are reports
of success with the mingw32 port of gcc.
Translating PyPy with Visual Studio
......@@ -34,10 +40,20 @@ Multi-threaded DLL (/MD) runtime environment.
**Note:** PyPy is currently not supported for 64 bit Windows, and translation
will fail in this case.
The compiler is all you need to build pypy-c, but it will miss some
Python and a C compiler are all you need to build pypy, but it will miss some
modules that relies on third-party libraries. See below how to get
and build them.
Please see the `non-windows instructions`_ for more information, especially note
that translation is RAM-hungry. A standard translation requires around 4GB, so
special preparations are necessary, or you may want to use the method in the
notes of the `build instructions`_ to reduce memory usage at the price of a
slower translation::
set PYPY_GC_MAX_DELTA=200MB
pypy --jit loop_longevity=300 ../../rpython/bin/rpython -Ojit targetpypystandalone
set PYPY_GC_MAX_DELTA=
Preping Windows for the Large Build
-----------------------------------
......@@ -52,9 +68,10 @@ Windows 64bit.
Then you need to execute::
editbin /largeaddressaware pypy.exe
editbin /largeaddressaware translator.exe
on the pypy.exe file you compiled.
where ``translator.exe`` is the pypy.exe or cpython.exe you will use to
translate with.
Installing external packages
----------------------------
......@@ -244,7 +261,9 @@ environment variable CC to the compliter exe, testing will use it.
.. _`msys for mingw`: http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29
.. _`libffi source files`: http://sourceware.org/libffi/
.. _`RPython translation toolchain`: translation.html
.. _`our downloads`: http://pypy.org/download.html
.. _`non-windows instructions`: getting-started-python.html#translating-the-pypy-python-interpreter
.. _`build instructions`: http://pypy.org/download.html#building-from-source
What is missing for a full 64-bit translation
---------------------------------------------
......
......@@ -4,6 +4,7 @@ Plain Python definition of the builtin I/O-related functions.
"""
import sys
from _ast import PyCF_ACCEPT_NULL_BYTES
def execfile(filename, glob=None, loc=None):
"""execfile(filename[, globals[, locals]])
......@@ -24,7 +25,8 @@ globals and locals. If only globals is given, locals defaults to it."""
finally:
f.close()
#Don't exec the source directly, as this loses the filename info
co = compile(source.rstrip()+"\n", filename, 'exec')
co = compile(source.rstrip()+"\n", filename, 'exec',
PyCF_ACCEPT_NULL_BYTES)
exec co in glob, loc
def _write_prompt(stdout, prompt):
......
import sys
from rpython.tool.udir import udir
class AppTestBuiltinApp:
def setup_class(cls):
space = cls.space
class X(object):
def __eq__(self, other):
raise OverflowError
......@@ -11,18 +14,25 @@ class AppTestBuiltinApp:
try:
d[X()]
except OverflowError:
cls.w_sane_lookup = cls.space.wrap(True)
cls.w_sane_lookup = space.wrap(True)
except KeyError:
cls.w_sane_lookup = cls.space.wrap(False)
cls.w_sane_lookup = space.wrap(False)
# starting with CPython 2.6, when the stack is almost out, we
# can get a random error, instead of just a RuntimeError.
# For example if an object x has a __getattr__, we can get
# AttributeError if attempting to call x.__getattr__ runs out
# of stack. That's annoying, so we just work around it.
if cls.runappdirect:
cls.w_safe_runtimerror = cls.space.wrap(True)
cls.w_safe_runtimerror = space.wrap(True)
else:
cls.w_safe_runtimerror = cls.space.wrap(sys.version_info < (2, 6))
cls.w_safe_runtimerror = space.wrap(sys.version_info < (2, 6))
emptyfile = udir.join('emptyfile.py')
emptyfile.write('')
nullbytes = udir.join('nullbytes.py')
nullbytes.write('#abc\x00def\n')
cls.w_emptyfile = space.wrap(str(emptyfile))
cls.w_nullbytes = space.wrap(str(nullbytes))
def test_builtin_names(self):
import __builtin__
......@@ -431,7 +441,7 @@ class AppTestBuiltinApp:
assert setattr(x, 'x', 11) == None
assert delattr(x, 'x') == None
# To make this test, we need autopath to work in application space.
#self.assertEquals(execfile('emptyfile.py'), None)
assert execfile(self.emptyfile) == None
def test_divmod(self):
assert divmod(15,10) ==(1,5)
......@@ -611,14 +621,21 @@ def fn(): pass
assert firstlineno == 2
def test_compile_null_bytes(self):
import _ast
raises(TypeError, compile, '\x00', 'mymod', 'exec', 0)
raises(SyntaxError, compile, '\x00', 'mymod', 'exec',
_ast.PyCF_ACCEPT_NULL_BYTES)
src = "#abc\x00def\n"
raises(TypeError, compile, src, 'mymod', 'exec')
raises(TypeError, compile, src, 'mymod', 'exec', 0)
compile(src, 'mymod', 'exec', _ast.PyCF_ACCEPT_NULL_BYTES) # works
execfile(self.nullbytes) # works
def test_compile_null_bytes_flag(self):
try:
from _ast import PyCF_ACCEPT_NULL_BYTES
except ImportError:
skip('PyPy only (requires _ast.PyCF_ACCEPT_NULL_BYTES)')
raises(SyntaxError, compile, '\x00', 'mymod', 'exec',
PyCF_ACCEPT_NULL_BYTES)
src = "#abc\x00def\n"
compile(src, 'mymod', 'exec', PyCF_ACCEPT_NULL_BYTES) # works
def test_print_function(self):
import __builtin__
......@@ -720,7 +737,6 @@ class AppTestGetattrWithGetAttributeShortcut(AppTestGetattr):
class TestInternal:
def test_execfile(self, space):
from rpython.tool.udir import udir
fn = str(udir.join('test_execfile'))
f = open(fn, 'w')
print >>f, "i=42"
......
......@@ -675,7 +675,7 @@ def merge_knowntypedata(ktd1, ktd2):
def not_const(s_obj):
if s_obj.is_constant() and not isinstance(s_obj, SomePBC):
if s_obj.is_constant() and not isinstance(s_obj, (SomePBC, SomeNone)):
new_s_obj = SomeObject.__new__(s_obj.__class__)
dic = new_s_obj.__dict__ = s_obj.__dict__.copy()
if 'const' in dic:
......
......@@ -130,8 +130,9 @@ def test_blocked_inference2():
py.test.raises(AnnotatorError, compile_function, blocked_inference)
if __name__ == '__main__':
for name, value in globals().items():
if name.startswith('test_'):
value()
def test_not_const():
s_int = SomeInteger()
s_int.const = 2
assert s_int != SomeInteger()
assert not_const(s_int) == SomeInteger()
assert not_const(s_None) == s_None
Retrieved from http://www.unicode.org/copyright.html#Exhibit1 June 2 2014
-------------------------------------------------------------------------
COPYRIGHT AND PERMISSION NOTICE
Copyright © 1991-2014 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in
http://www.unicode.org/copyright.html.
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Unicode data files and any associated documentation
(the "Data Files") or Unicode software and any associated documentation
(the "Software") to deal in the Data Files or Software
without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, and/or sell copies of
the Data Files or Software, and to permit persons to whom the Data Files
or Software are furnished to do so, provided that
(a) this copyright and permission notice appear with all copies
of the Data Files or Software,
(b) this copyright and permission notice appear in associated
documentation, and
(c) there is clear notice in each modified Data File or in the Software
as well as in the documentation associated with the Data File(s) or
Software that the data or software has been modified.
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.
......@@ -73,6 +73,7 @@ class RStringIO(object):
self.__strings.append(buffer)
def __slow_write(self, buffer):
assert buffer is not None # help annotator
p = self.__pos
assert p >= 0
endp = p + len(buffer)
......
# CompositionExclusions-6.2.0.txt
# Date: 2012-05-15, 22:21:00 GMT [KW, LI]
#
# This file lists the characters for the Composition Exclusion Table
# defined in UAX #15, Unicode Normalization Forms.
#
# This file is a normative contributory data file in the
# Unicode Character Database.
#
# Copyright (c) 1991-2012 Unicode, Inc.
# For terms of use, see http://www.unicode.org/terms_of_use.html
#
# For more information, see
# http://www.unicode.org/unicode/reports/tr15/#Primary_Exclusion_List_Table
#
# For a full derivation of composition exclusions, see the derived property
# Full_Composition_Exclusion in DerivedNormalizationProps.txt
#
# ================================================
# (1) Script Specifics
#
# This list of characters cannot be derived from the UnicodeData.txt file.
# ================================================
0958 # DEVANAGARI LETTER QA
0959 # DEVANAGARI LETTER KHHA
095A # DEVANAGARI LETTER GHHA
095B # DEVANAGARI LETTER ZA
095C # DEVANAGARI LETTER DDDHA
095D # DEVANAGARI LETTER RHA
095E # DEVANAGARI LETTER FA
095F # DEVANAGARI LETTER YYA
09DC # BENGALI LETTER RRA
09DD # BENGALI LETTER RHA
09DF # BENGALI LETTER YYA
0A33 # GURMUKHI LETTER LLA
0A36 # GURMUKHI LETTER SHA
0A59 # GURMUKHI LETTER KHHA
0A5A # GURMUKHI LETTER GHHA
0A5B # GURMUKHI LETTER ZA
0A5E # GURMUKHI LETTER FA
0B5C # ORIYA LETTER RRA
0B5D # ORIYA LETTER RHA
0F43 # TIBETAN LETTER GHA
0F4D # TIBETAN LETTER DDHA
0F52 # TIBETAN LETTER DHA
0F57 # TIBETAN LETTER BHA
0F5C # TIBETAN LETTER DZHA
0F69 # TIBETAN LETTER KSSA
0F76 # TIBETAN VOWEL SIGN VOCALIC R
0F78 # TIBETAN VOWEL SIGN VOCALIC L
0F93 # TIBETAN SUBJOINED LETTER GHA
0F9D # TIBETAN SUBJOINED LETTER DDHA
0FA2 # TIBETAN SUBJOINED LETTER DHA
0FA7 # TIBETAN SUBJOINED LETTER BHA
0FAC # TIBETAN SUBJOINED LETTER DZHA
0FB9 # TIBETAN SUBJOINED LETTER KSSA
FB1D # HEBREW LETTER YOD WITH HIRIQ
FB1F # HEBREW LIGATURE YIDDISH YOD YOD PATAH
FB2A # HEBREW LETTER SHIN WITH SHIN DOT
FB2B # HEBREW LETTER SHIN WITH SIN DOT
FB2C # HEBREW LETTER SHIN WITH DAGESH AND SHIN DOT
FB2D # HEBREW LETTER SHIN WITH DAGESH AND SIN DOT
FB2E # HEBREW LETTER ALEF WITH PATAH
FB2F # HEBREW LETTER ALEF WITH QAMATS
FB30 # HEBREW LETTER ALEF WITH MAPIQ
FB31 # HEBREW LETTER BET WITH DAGESH
FB32 # HEBREW LETTER GIMEL WITH DAGESH
FB33 # HEBREW LETTER DALET WITH DAGESH
FB34 # HEBREW LETTER HE WITH MAPIQ
FB35 # HEBREW LETTER VAV WITH DAGESH
FB36 # HEBREW LETTER ZAYIN WITH DAGESH
FB38 # HEBREW LETTER TET WITH DAGESH
FB39 # HEBREW LETTER YOD WITH DAGESH
FB3A # HEBREW LETTER FINAL KAF WITH DAGESH
FB3B # HEBREW LETTER KAF WITH DAGESH
FB3C # HEBREW LETTER LAMED WITH DAGESH
FB3E # HEBREW LETTER MEM WITH DAGESH
FB40 # HEBREW LETTER NUN WITH DAGESH
FB41 # HEBREW LETTER SAMEKH WITH DAGESH
FB43 # HEBREW LETTER FINAL PE WITH DAGESH
FB44 # HEBREW LETTER PE WITH DAGESH
FB46 # HEBREW LETTER TSADI WITH DAGESH
FB47 # HEBREW LETTER QOF WITH DAGESH
FB48 # HEBREW LETTER RESH WITH DAGESH
FB49 # HEBREW LETTER SHIN WITH DAGESH
FB4A # HEBREW LETTER TAV WITH DAGESH
FB4B # HEBREW LETTER VAV WITH HOLAM
FB4C # HEBREW LETTER BET WITH RAFE
FB4D # HEBREW LETTER KAF WITH RAFE
FB4E # HEBREW LETTER PE WITH RAFE
# Total code points: 67
# ================================================
# (2) Post Composition Version precomposed characters
#
# These characters cannot be derived solely from the UnicodeData.txt file
# in this version of Unicode.
#
# Note that characters added to the standard after the
# Composition Version and which have canonical decomposition mappings
# are not automatically added to this list of Post Composition
# Version precomposed characters.
# ================================================
2ADC # FORKING
1D15E # MUSICAL SYMBOL HALF NOTE
1D15F # MUSICAL SYMBOL QUARTER NOTE
1D160 # MUSICAL SYMBOL EIGHTH NOTE
1D161 # MUSICAL SYMBOL SIXTEENTH NOTE
1D162 # MUSICAL SYMBOL THIRTY-SECOND NOTE
1D163 # MUSICAL SYMBOL SIXTY-FOURTH NOTE
1D164 # MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
1D1BB # MUSICAL SYMBOL MINIMA
1D1BC # MUSICAL SYMBOL MINIMA BLACK
1D1BD # MUSICAL SYMBOL SEMIMINIMA WHITE
1D1BE # MUSICAL SYMBOL SEMIMINIMA BLACK
1D1BF # MUSICAL SYMBOL FUSA WHITE
1D1C0 # MUSICAL SYMBOL FUSA BLACK
# Total code points: 14
# ================================================
# (3) Singleton Decompositions
#
# These characters can be derived from the UnicodeData.txt file
# by including all canonically decomposable characters whose
# canonical decomposition consists of a single character.
#
# These characters are simply quoted here for reference.
# See also Full_Composition_Exclusion in DerivedNormalizationProps.txt
# ================================================
# 0340..0341 [2] COMBINING GRAVE TONE MARK..COMBINING ACUTE TONE MARK
# 0343 COMBINING GREEK KORONIS
# 0374 GREEK NUMERAL SIGN
# 037E GREEK QUESTION MARK
# 0387 GREEK ANO TELEIA
# 1F71 GREEK SMALL LETTER ALPHA WITH OXIA
# 1F73 GREEK SMALL LETTER EPSILON WITH OXIA
# 1F75 GREEK SMALL LETTER ETA WITH OXIA
# 1F77 GREEK SMALL LETTER IOTA WITH OXIA
# 1F79 GREEK SMALL LETTER OMICRON WITH OXIA
# 1F7B GREEK SMALL LETTER UPSILON WITH OXIA
# 1F7D GREEK SMALL LETTER OMEGA WITH OXIA
# 1FBB GREEK CAPITAL LETTER ALPHA WITH OXIA
# 1FBE GREEK PROSGEGRAMMENI
# 1FC9 GREEK CAPITAL LETTER EPSILON WITH OXIA
# 1FCB GREEK CAPITAL LETTER ETA WITH OXIA
# 1FD3 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
# 1FDB GREEK CAPITAL LETTER IOTA WITH OXIA
# 1FE3 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
# 1FEB GREEK CAPITAL LETTER UPSILON WITH OXIA
# 1FEE..1FEF [2] GREEK DIALYTIKA AND OXIA..GREEK VARIA
# 1FF9 GREEK CAPITAL LETTER OMICRON WITH OXIA
# 1FFB GREEK CAPITAL LETTER OMEGA WITH OXIA
# 1FFD GREEK OXIA
# 2000..2001 [2] EN QUAD..EM QUAD
# 2126 OHM SIGN
# 212A..212B [2] KELVIN SIGN..ANGSTROM SIGN
# 2329 LEFT-POINTING ANGLE BRACKET
# 232A RIGHT-POINTING ANGLE BRACKET
# F900..FA0D [270] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA0D
# FA10 CJK COMPATIBILITY IDEOGRAPH-FA10
# FA12 CJK COMPATIBILITY IDEOGRAPH-FA12
# FA15..FA1E [10] CJK COMPATIBILITY IDEOGRAPH-FA15..CJK COMPATIBILITY IDEOGRAPH-FA1E
# FA20 CJK COMPATIBILITY IDEOGRAPH-FA20
# FA22 CJK COMPATIBILITY IDEOGRAPH-FA22
# FA25..FA26 [2] CJK COMPATIBILITY IDEOGRAPH-FA25..CJK COMPATIBILITY IDEOGRAPH-FA26
# FA2A..FA6D [68] CJK COMPATIBILITY IDEOGRAPH-FA2A..CJK COMPATIBILITY IDEOGRAPH-FA6D
# FA70..FAD9 [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
# 2F800..2FA1D [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
# Total code points: 1035
# ================================================
# (4) Non-Starter Decompositions
#
# These characters can be derived from the UnicodeData.txt file
# by including each expanding canonical decomposition
# (i.e., those which canonically decompose to a sequence
# of characters instead of a single character), such that:
#
# A. The character is not a Starter.
#
# OR (inclusive)
#
# B. The character's canonical decomposition begins
# with a character that is not a Starter.
#
# Note that a "Starter" is any character with a zero combining class.
#
# These characters are simply quoted here for reference.
# See also Full_Composition_Exclusion in DerivedNormalizationProps.txt
# ================================================
# 0344 COMBINING GREEK DIALYTIKA TONOS
# 0F73 TIBETAN VOWEL SIGN II
# 0F75 TIBETAN VOWEL SIGN UU
# 0F81 TIBETAN VOWEL SIGN REVERSED II
# Total code points: 4
# EOF
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#
# Unihan_NumericValues.txt
# Date: 2012-08-17 17:13:30 GMT [JHJ]
# Unicode version: 6.2.0
#
# Unicode Character Database
# Copyright (c) 1991-2012 Unicode, Inc.
# For terms of use, see http://www.unicode.org/terms_of_use.html
# For documentation, see http://www.unicode.org/reports/tr44/
#
# This file contains data on the following fields from the Unihan database:
# kAccountingNumeric
# kOtherNumeric
# kPrimaryNumeric
#
# For details on the file format, see http://www.unicode.org/reports/tr38/
#
U+3405 kOtherNumeric 5
U+3483 kOtherNumeric 2
U+382A kOtherNumeric 5
U+3B4D kOtherNumeric 7
U+4E00 kPrimaryNumeric 1
U+4E03 kPrimaryNumeric 7
U+4E07 kPrimaryNumeric 10000
U+4E09 kPrimaryNumeric 3
U+4E5D kPrimaryNumeric 9
U+4E8C kPrimaryNumeric 2
U+4E94 kPrimaryNumeric 5
U+4E96 kOtherNumeric 4
U+4EBF kPrimaryNumeric 100000000
U+4EC0 kOtherNumeric 10
U+4EDF kAccountingNumeric 1000
U+4EE8 kOtherNumeric 3
U+4F0D kAccountingNumeric 5
U+4F70 kAccountingNumeric 100
U+5104 kPrimaryNumeric 100000000
U+5146 kPrimaryNumeric 1000000000000
U+5169 kOtherNumeric 2
U+516B kPrimaryNumeric 8
U+516D kPrimaryNumeric 6
U+5341 kPrimaryNumeric 10
U+5343 kPrimaryNumeric 1000
U+5344 kOtherNumeric 20
U+5345 kOtherNumeric 30
U+534C kOtherNumeric 40
U+53C1 kAccountingNumeric 3
U+53C2 kAccountingNumeric 3
U+53C3 kAccountingNumeric 3
U+53C4 kOtherNumeric 3
U+56DB kPrimaryNumeric 4
U+58F1 kAccountingNumeric 1
U+58F9 kAccountingNumeric 1
U+5E7A kOtherNumeric 1
U+5EFE kOtherNumeric 9
U+5EFF kOtherNumeric 20
U+5F0C kAccountingNumeric 1
U+5F0D kAccountingNumeric 2
U+5F0E kAccountingNumeric 3
U+5F10 kAccountingNumeric 2
U+62FE kAccountingNumeric 10
U+634C kAccountingNumeric 8
U+67D2 kAccountingNumeric 7
U+6F06 kAccountingNumeric 7
U+7396 kAccountingNumeric 9
U+767E kPrimaryNumeric 100
U+8086 kAccountingNumeric 4
U+842C kAccountingNumeric 10000
U+8CAE kAccountingNumeric 2
U+8CB3 kAccountingNumeric 2
U+8D30 kAccountingNumeric 2
U+9621 kAccountingNumeric 1000
U+9646 kAccountingNumeric 6
U+964C kAccountingNumeric 100
U+9678 kAccountingNumeric 6
U+96F6 kPrimaryNumeric 0
U+20001 kOtherNumeric 7
U+20064 kOtherNumeric 4
U+200E2 kOtherNumeric 4
U+20121 kOtherNumeric 5
U+2092A kOtherNumeric 1
U+20983 kOtherNumeric 30
U+2098C kOtherNumeric 40
U+2099C kOtherNumeric 40
U+20AEA kOtherNumeric 6
U+20AFD kOtherNumeric 3
U+20B19 kOtherNumeric 3
U+22390 kOtherNumeric 2
U+22998 kOtherNumeric 3
U+23B1B kOtherNumeric 3
U+2626D kOtherNumeric 4
# EOF
This diff is collapsed.
......@@ -2178,9 +2178,9 @@ def render_immortal(p, track_allocation=True):
def ann_render_immortal(s_p, s_track_allocation=None):
assert s_track_allocation is None or s_track_allocation.is_constant()
def _make_scoped_allocator(T):
def _make_scoped_allocator(T, zero):
class ScopedAlloc:
def __init__(self, n=None, zero=False):
def __init__(self, n=None):
if n is None:
self.buf = malloc(T, flavor='raw', zero=zero)
else:
......@@ -2204,8 +2204,8 @@ def scoped_alloc(T, n=None, zero=False):
...use array...
...it's freed now.
"""
return _make_scoped_allocator(T)(n=n, zero=zero)
scoped_alloc._annspecialcase_ = 'specialize:arg(0)'
return _make_scoped_allocator(T, zero)(n=n)
scoped_alloc._annspecialcase_ = 'specialize:arg(0, 2)'
def functionptr(TYPE, name, **attrs):
if not isinstance(TYPE, FuncType):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment