File: instance.pxd

package info (click to toggle)
cython 0.15.1-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 16,480 kB
  • sloc: python: 45,354; xml: 1,031; cpp: 635; makefile: 229; lisp: 48; ansic: 28
file content (25 lines) | stat: -rw-r--r-- 985 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cdef extern from "Python.h":

    ############################################################################
    # 7.5.2 Instance Objects
    ############################################################################

    # PyTypeObject PyInstance_Type
    #
    # Type object for class instances.

    int PyInstance_Check(object obj)
    # Return true if obj is an instance.

    object PyInstance_New(object cls, object arg, object kw)
    # Return value: New reference.
    # Create a new instance of a specific class. The parameters arg
    # and kw are used as the positional and keyword parameters to the
    # object's constructor.

    object PyInstance_NewRaw(object cls, object dict)
    # Return value: New reference.
    # Create a new instance of a specific class without calling its
    # constructor. class is the class of new object. The dict
    # parameter will be used as the object's __dict__; if NULL, a new
    # dictionary will be created for the instance.