Source

pyd / infrastructure / pyd / func_wrap.d

Author Commit Message Labels Comments Date
ariovistus
playing with ctypes some ddoc touchups
ariovistus
allow python to skip d default arguments add error message when an invalid keyword argument is given.
ariovistus
fixes for pending 2.061 there is a std.typetuple.Filter override enforcement is stricter __traits(compiles, Type.fun( <stuff> )) is no longer true PydInputRange is a struct, if value is copied, iter's refcount must be incremented
ariovistus
hey, look! there's a ParameterDefaultValueTuple template in std.traits! How useful!
ariovistus
apparently conversion for delegates and fps didn't work. now it does. added some playing with multithreading and pyd. seems not to die too horribly.
ariovistus
switched pyd to use deimos headers. calling substitute_and_alias broke link, so it's out (sort of). embedding python works! fixed some holdovers in deimos.python.object
ariovistus
renamed conversion functions. d_type is now python_to_d _py is now d_to_python PydObject.toDItem is now PydObject.to_d python_to_d is now ex_python_to_d d_to_python is now ex_d_to_python parrot is now ex_parrot now enforcing naming convention on pyd: * public facing functions are named like this: foo_bar * types and templates are named like this: FooBar changed…
ariovistus
signature overhaul. * def, Def, StaticDef, Property used to take many parameters most of which were strings and tried to shoehorn as many as possible to be optional via positional default arguments and lots of overloads. That changes today. Now: 1 signature, all parameters optional, poor man's keyword arguments. * class_wrap and struct_wrap get similar treatment * in unrelated news, struct_wrap now works * often, docstring is provided as a runtime argument. I assume this is more shoehorning; I can't see any advantage to such late specification, so now it and modulename are compile time arguments property annotated functions: what a nuisance. * Property can handle them now. * Len can handle them now. * Repr can handle them now. Member works! Todo: should we scrap all these dedicated operator overloads in favor of enabling Def!(Fn, "__op__") ? boost::python seems to roll this way
ariovistus
hey, candydoc is nice. Add some doc to code merge dg_convert and lib_abstract into func_wrap got rid of some cruft duplicated in doc/ or the bitbucket wiki.
ariovistus
got us some compiles on windows! all our examples are working nicely with dmd (except wrap - ICE!) loading multiple pyd extension libraries works! stupid optlink needs OMF libraries
ariovistus
things not to do in method_wrap: virtual-call the method we're wrapping if it is a virtual function, you'll end up calling the shim class's override, which recalls method_wrap because it thinks you're a python subclass (I guess). Since the wrapping function takes care of default and variadic arguments, we can convert the function alias to a delegate inside method_wrap. nowadays, delegate's ptr and funcptr are standard.
ariovistus
def and Def now support keyword arguments, default arguments, and typesafe variadic arguments. OwnPyRef is a dumb name, as people will be looking for Py_INCREF, so overload Py_INCREF!
ariovistus
keywords for def, StaticDef enabled. also, default arguments and typesafe variadic arguments are supported by def, StaticDef.
ariovistus
We have keyword arguments [in python]! currently works on constructors, but defs shouldn't be hard to enable. improved error messaging after D Exception -> Python Exception conversion.
ariovistus
def and Def properly select from overloaded functions
ariovistus
Init now supports default arguments and typesafe variadic arguments. improvement to Replace: favor longer replacees if ambiguity hello Join! moved unittests in pyind to dedicated pyd_unittests.
ariovistus
added OpIndex
ariovistus
s/const/enum/
ariovistus
Default can die, since we assume phobos always exists. missed some details when adding multi_index. Demangle needed some updating. Status now with linux 64 bit ldc2/dmd fe 2.059: arraytest, inherit, pyind, and rawexample work hello compiles and runs, but segfaults on exit testdll doesn't compile.
ariovistus
two main changes: Borrowed References are now reflected in the type system, because it is a huge PITA to track down associated refcounting bugs Got most of the functions that return borrowed references, but there might be more. python.d needs to be formatted. functions zc and zcc ensure that strings passed to python are zero terminated, but don't allocate if they don't have to. Also, there is some wonkery going…
ariovistus
examples now compile and run, except testdll and inherit meta.Demangle is preventing testdll from compiling inherit is running, but then it segfaults, I guess when druntime tries to shut down
ariovistus
hey, look! someone else already wrote a readme! in the middle of getting pyd to compile in ldc 2.058fe
ariovistus
arraytest example works! stupid (*^*& dos formatting also, it seems using that code off the forums or whereever it came from wasn't a great idea.
ariovistus
hello world! trying to resurrect pyd for a recent (~ dmd2.055) version of gdc. this is a d2 only build, and I'm hoping mostly to get it to work with python 2.7, although I am trying to make the python.d valid all the way back to 2.4.