Did I find the right examples for you? yes no

All Samples(10)  |  Call(7)  |  Derive(0)  |  Import(3)

src/c/y/CythonCTypesBackend-HEAD/Cython/CTypesBackend/ExternDefTransform.py   CythonCTypesBackend(Download)
from Cython.Compiler.Visitor import VisitorTransform
from Cython.Compiler.Nodes import CFuncDeclaratorNode, CVarDefNode, SingleAssignmentNode, CStructOrUnionDefNode, PyClassDefNode, StatListNode, PassStatNode, CPtrDeclaratorNode, DecoratorNode, FuncDefNode
from Cython.Compiler.ExprNodes import NameNode, AttributeNode, ListNode, NoneNode, TupleNode, StringNode, SimpleCallNode, ImportNode, CallNode
from Cython.Compiler.TreeFragment import TreeFragment
import ctypes
        rhs=SimpleCallNode(0,
                         child_attrs=[],
                         function=AttributeNode(0, obj=NameNode(0, name=u"cython"), attribute=u"ctypes_func"),
                         args=[NameNode(0, name="'%s'" % declarator.base.name), 
                               NameNode(0, name="'%s'" % libname), 
                                        rhs=SimpleCallNode(0,
                                                           child_attrs=[],
                                                           function=AttributeNode(0, obj=NameNode(0, name=u"cython"), attribute=u"ctypes_struct"),
                                                           args=[NameNode(0, name='['+','.join(['("%s", %s)' % field for field in node.attributes]) + ']')]))
 
                                        rhs=SimpleCallNode(0,
                                                           child_attrs=[],
                                                           function=AttributeNode(0, obj=NameNode(0, name=u"cython"), attribute=u"ctypes_union"),
                                                           args=args))
 

src/c/y/CythonCTypesBackend-HEAD/Cython/CTypesBackend/CDefVarTransform.py   CythonCTypesBackend(Download)
from Cython.Compiler.Visitor import VisitorTransform
from Cython.Compiler.TreeFragment import TreeFragment
from Cython.Compiler.Nodes import CPtrDeclaratorNode, CArrayDeclaratorNode
from Cython.Compiler.ExprNodes import NameNode, AttributeNode, SimpleCallNode
 
class CDefVarTransform(VisitorTransform):
    visit_Node = VisitorTransform.recurse_to_children
 
 
    __ctypes_declare_node = AttributeNode(0, obj=NameNode(0, name=u"cython"), attribute=u"ctypes_func")
            subType = SimpleCallNode(0,
                         child_attrs=[],
                         function=AttributeNode(0, obj=NameNode(0, name=u"ctypes"), attribute=u"POINTER"),
                         args=[self._get_type_node(decl.base, base_type, is_sub_call=True)])
 
            if not is_sub_call:
                subType = SimpleCallNode(0,
                         child_attrs=[],
                         function=AttributeNode(0, obj=NameNode(0, name=u"cython"), attribute=u"ctypes_declare"),

src/c/y/CythonCTypesBackend-HEAD/Cython/CTypesBackend/CDefVarManipulationTransform.py   CythonCTypesBackend(Download)
from Cython.Compiler.Visitor import VisitorTransform
from Cython.Compiler.Nodes import SingleAssignmentNode, CascadedAssignmentNode, InPlaceAssignmentNode, ParallelAssignmentNode
from Cython.Compiler.ExprNodes import AttributeNode, NameNode, SimpleCallNode
from Cython.Compiler.PyrexTypes import CStructOrUnionType
from Cython.Compiler.TreeFragment import TreeFragment
    def visit_NameNode(self, node):
        if self.is_basic_C_type(node):
            return AttributeNode(0, obj=node, attribute=u"value")
        return node