コード例 #1
0
ファイル: Code.py プロジェクト: dagss/cython
    def put_decref_clear(self, cname, type, nanny=True):
        from PyrexTypes import py_object_type, typecast

        if nanny:
            self.putln("__Pyx_DECREF(%s); %s = 0;" % (typecast(py_object_type, type, cname), cname))
        else:
            self.putln("Py_DECREF(%s); %s = 0;" % (typecast(py_object_type, type, cname), cname))
コード例 #2
0
ファイル: Code.py プロジェクト: SpotOnInc/fabric-yaml
 def put_decref_clear(self, cname, type, nanny=True):
     from PyrexTypes import py_object_type, typecast
     if nanny:
         self.putln("__Pyx_DECREF(%s); %s = 0;" %
                    (typecast(py_object_type, type, cname), cname))
     else:
         self.putln("Py_DECREF(%s); %s = 0;" %
                    (typecast(py_object_type, type, cname), cname))
コード例 #3
0
ファイル: Code.py プロジェクト: SpotOnInc/fabric-yaml
 def put_init_to_py_none(self, cname, type, nanny=True):
     from PyrexTypes import py_object_type, typecast
     py_none = typecast(type, py_object_type, "Py_None")
     if nanny:
         self.putln("%s = %s; __Pyx_INCREF(Py_None);" % (cname, py_none))
     else:
         self.putln("%s = %s; Py_INCREF(Py_None);" % (cname, py_none))
コード例 #4
0
ファイル: Code.py プロジェクト: certik/cython
 def put_init_to_py_none(self, cname, type, nanny=True):
     from PyrexTypes import py_object_type, typecast
     py_none = typecast(type, py_object_type, "Py_None")
     if nanny:
         self.putln("%s = %s; __Pyx_INCREF(Py_None);" % (cname, py_none))
     else:
         self.putln("%s = %s; Py_INCREF(Py_None);" % (cname, py_none))
コード例 #5
0
ファイル: Code.py プロジェクト: dagss/cython
    def as_pyobject(self, cname, type):
        from PyrexTypes import py_object_type, typecast

        return typecast(py_object_type, type, cname)
コード例 #6
0
ファイル: Code.py プロジェクト: enyst/plexnet
 def put_init_to_py_none(self, cname, type):
     py_none = typecast(type, py_object_type, "Py_None")
     self.putln("%s = %s; Py_INCREF(Py_None);" % (cname, py_none))
コード例 #7
0
ファイル: Code.py プロジェクト: enyst/plexnet
 def put_decref_clear(self, cname, type):
     self.putln("Py_DECREF(%s); %s = 0;" % (
         typecast(py_object_type, type, cname), cname))
コード例 #8
0
ファイル: Code.py プロジェクト: enyst/plexnet
 def as_pyobject(self, cname, type):
     return typecast(py_object_type, type, cname)
コード例 #9
0
ファイル: Code.py プロジェクト: SpotOnInc/fabric-yaml
 def as_pyobject(self, cname, type):
     from PyrexTypes import py_object_type, typecast
     return typecast(py_object_type, type, cname)
コード例 #10
0
 def put_init_to_py_none(self, cname, type):
     py_none = typecast(type, py_object_type, "Py_None")
     self.putln("%s = %s; Py_INCREF(Py_None);" % (cname, py_none))
コード例 #11
0
 def put_decref_clear(self, cname, type):
     self.putln("Py_DECREF(%s); %s = 0;" %
                (typecast(py_object_type, type, cname), cname))
コード例 #12
0
 def as_pyobject(self, cname, type):
     return typecast(py_object_type, type, cname)
コード例 #13
0
ファイル: Code.py プロジェクト: jwilk-mirrors/Pyrex
	def as_pyobject(self, cname, type):
		if type:
			return typecast(py_object_type, type, cname)
		else:
			return cname