Fixed ruby's newobject1 and newobject2 demos.

Added swig_assert.rb and started using it in some tests.
Added my patches to ruby.cxx, rubyrun.swg, rubystrings.swg
and rubytracking.swg [see: sourceforge]



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9691 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Gonzalo Garramuno 2007-04-28 04:20:28 +00:00
commit 4b8d11d0e2
111 changed files with 1309 additions and 50 deletions

View file

@ -7,11 +7,11 @@ SWIGINTERN int
SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
{
if (TYPE(obj) == T_STRING) {
#if defined(StringValuePtr)
char *cstr = rb_string_value_ptr(&(obj));
#else
%#if defined(StringValuePtr)
char *cstr = StringValuePtr(obj);
%#else
char *cstr = STR2CSTR(obj);
#endif
%#endif
size_t size = RSTRING_LEN(obj) + 1;
if (cptr) {
if (alloc) {