Menu

#64 SRAPI and std:vector

closed
nobody
None
5
2006-09-16
2004-02-13
John Lenz
No

A while back on the swig-dev there was some discussion
on the SRAPI, that is the swig runtime api. Here is a
start on some actual code :) I have converted
std::vector to be language independent. The target
language modules define the following macros

SWIG_Vector_SetError(string, argnum)

SWIG_Vector_Directors

SWIG_Vector_VectorType
SWIG_Vector_ElementType

bool SWIG_Vector_IsVector(x)
SWIG_Vector_GetSize(size, x)
SWIG_Vector_GetItem(element, x, index)
SWIG_Vector_DecrementRef(x)
SWIG_Vector_VectorType SWIG_Vector_New(vector, size)
SWIG_Vector_SetItem(x, index, value)
SWIG_Vector_SetNewVectorResult(result, vector)

And then include std_vector_common.i

NOTE: This is very development... The lib_std_vector.i
file in the test suite was really my only test so far.

Known Problems:
1) Tcl specialize_std_vector needs work
2) Mzscheme SWIG_Vector_GetSize() needs some code
3) Ruby: the each() extended function on specialized
vectors doesn't work right.
4) Bug in guile module causes a bug with FUNC_NAME

Problem 4 is fixed with the func-name.diff patch to
Source/Modules/guile.cxx

Discussion

  • John Lenz

    John Lenz - 2004-02-13

    the main patch

     
  • John Lenz

    John Lenz - 2004-02-13

    small fix to guile module

     
  • Matthias Koeppe

    Matthias Koeppe - 2004-02-23

    Logged In: YES
    user_id=38855

    I have applied the small patch "funcname.diff". Thanks!

     
  • John Lenz

    John Lenz - 2006-09-16
    • status: open --> closed
     

Log in to post a comment.