Exemple #1
0
    def from_object(instance):
        """
        Build a Object for a Python object.
        """

        from qy import constant_pointer_to

        return Object(constant_pointer_to(instance, qy.object_ptr_type))
Exemple #2
0
        def decorator(callable_):
            """
            Emit a call to an arbitrary Python object.
            """

            # XXX properly associate a destructor with the module, etc

            Qy.__whatever += [callable_]

            from qy import (
                Object,
                constant_pointer_to,
                )

            Object(constant_pointer_to(callable_, self.object_ptr_type))(*arguments)