Show
Ignore:
Timestamp:
08/13/07 17:12:37 (5 years ago)
Author:
KirkMcDonald
Message:

* Un-broke Init. (Oops.)
* Reverted some symbol-length-shortening code, which caused the above problem.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/infrastructure/pyd/ctor_wrap.d

    r121 r122  
    6565} 
    6666 
     67//import std.stdio; 
    6768// This template accepts a tuple of function pointer types, which each describe 
    6869// a ctor of T, and  uses them to wrap a Python tp_init function. 
    69 template wrapped_ctors(/*T,*/ C ...) { 
    70     alias shim_class T; 
     70template wrapped_ctors(T, C ...) { 
     71    //alias shim_class T; 
    7172    alias wrapped_class_object!(T) wrap_object; 
    7273 
     
    7677 
    7778        return exception_catcher({ 
     79            //writefln("in init_func: len=%s, T=%s, C.length=%s", len, typeid(T), C.length); 
    7880            // Default ctor 
    7981            static if (is(typeof(new T))) { 
     
    8789            foreach(i, arg; c) { 
    8890                alias ParameterTypeTuple!(typeof(arg)) Ctor; 
     91                //writefln("  init_func: i=%s, Ctor.length=%s, Ctor=%s", i, Ctor.length, typeid(typeof(arg))); 
    8992                if (Ctor.length == len) { 
    9093                    auto fn = &call_ctor!(T, ParameterTypeTuple!(typeof(arg))); 
     
    9497                    } 
    9598                    alias typeof(fn) dg_t; 
    96                     mixin applyPyTupleToDelegate!(dg_t)
     99                    //mixin applyPyTupleToDelegate!(dg_t) A
    97100                    T t = applyPyTupleToDelegate(fn, args); 
    98101                    if (t is null) {