@@ -40,7 +40,7 @@ GLEW include file declarations in glew.h.
40
40
* Categorize OpenGL bindings as "good" or "bad" according to whether
41
41
or not they have pointer arguments.
42
42
43
- - The good routines
43
+ - The good routines (DONE)
44
44
- translate cleanly to XS with default typemaps
45
45
- won't require a separate _p perlish version
46
46
- There are 1265 good routines that translate directly (yay!)
@@ -62,19 +62,28 @@ GLEW include file declarations in glew.h.
62
62
- 2 routines with 6 ptrs
63
63
- 1 routines with 7 ptrs
64
64
65
- - Still needs to be detemined the best typemap for pointers
65
+ - Propose using T_PTRREF or T_PTROBJ for pointers at perl level
66
66
- T_PTR is simple but could lead to SEGFAULT with bad values
67
- - Opaque pointers might be better
68
- - If the perl value corresponding to the pointer argument is
69
- some type of reference (blessed or unblessed) we can use
70
- that information to implement simply. For example, a
71
- single argument could be :
72
- - an array ref, [ ]
73
- - a hash ref, { }
74
- - a scalar ref, \$
75
- - a blessed object: PDL, Cpointer, OGA, ...
67
+ - T_PTRREF/OBJ protect pointer value from accidental corruption
68
+ - Using a reference/object makes for simple typemaps
69
+ - Just use ref to identify and then use
70
+ - Can be done from Perl or C/XS
71
+ - Some examples :
72
+ - an array ref, [ ]
73
+ - a hash ref, { }
74
+ - a scalar ref, \$
75
+ - a blessed object: PDL, Cpointer, OGA, ...
76
76
77
77
* Consider writing generate-XS.pl as a modulino so that it could be
78
78
used as either a command or a module to load and use.
79
79
80
+ * Propose use of roles to generalize implementation
81
+ - Basic role provides placeholders for needed functionality
82
+ - Use around method modifiers to provide actual function
83
+ - Should be able to "compile" the around routine make fast
84
+ - could be memoized at the perl level
85
+ - could be done from the C/XS level
86
+ - First implementation will focus on functionality
87
+ - Optimized routines to come or use specific _c routine
88
+
80
89
0 commit comments