Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 491716 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-14 / +14 lines)
Line  Link Here
0
-- Examples/test-suite/guile/guile_ext_test_external.cxx
0
++ Examples/test-suite/guile/guile_ext_test_external.cxx
Lines 19-24 Link Here
19
SCM test_is_pointer(SCM val)
19
SCM test_is_pointer(SCM val)
20
{
20
{
21
#define FUNC_NAME "test-is-pointer"
21
#define FUNC_NAME "test-is-pointer"
22
  return SCM_BOOL(SWIG_IsPointer(val));
22
  return scm_from_bool(SWIG_IsPointer(val));
23
#undef FUNC_NAME
23
#undef FUNC_NAME
24
}
24
}
25
-- Lib/guile/guile_scm_run.swg
25
++ Lib/guile/guile_scm_run.swg
Lines 129-135 Link Here
129
    else
129
    else
130
      SCM_NEWSMOB2(smob, swig_tag, ptr, (void *) type);
130
      SCM_NEWSMOB2(smob, swig_tag, ptr, (void *) type);
131
131
132
    if (!cdata || SCM_NULLP(cdata->goops_class) || swig_make_func == SCM_EOL ) {
132
    if (!cdata || scm_is_null(cdata->goops_class) || swig_make_func == SCM_EOL ) {
133
      return smob;
133
      return smob;
134
    } else {
134
    } else {
135
      /* the scm_make() C function only handles the creation of gf,
135
      /* the scm_make() C function only handles the creation of gf,
Lines 149-155 Link Here
149
SWIG_Guile_PointerAddress(SCM object)
149
SWIG_Guile_PointerAddress(SCM object)
150
{
150
{
151
  SCM smob = SWIG_Guile_GetSmob(object);
151
  SCM smob = SWIG_Guile_GetSmob(object);
152
  if (SCM_NULLP(smob)) return 0;
152
  if (scm_is_null(smob)) return 0;
153
  else if (SCM_SMOB_PREDICATE(swig_tag, smob)
153
  else if (SCM_SMOB_PREDICATE(swig_tag, smob)
154
	   || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
154
	   || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
155
	   || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
155
	   || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
Lines 162-168 Link Here
162
SWIG_Guile_PointerType(SCM object)
162
SWIG_Guile_PointerType(SCM object)
163
{
163
{
164
  SCM smob = SWIG_Guile_GetSmob(object);
164
  SCM smob = SWIG_Guile_GetSmob(object);
165
  if (SCM_NULLP(smob)) return NULL;
165
  if (scm_is_null(smob)) return NULL;
166
  else if (SCM_SMOB_PREDICATE(swig_tag, smob)
166
  else if (SCM_SMOB_PREDICATE(swig_tag, smob)
167
	   || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
167
	   || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
168
	   || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
168
	   || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
Lines 178-184 Link Here
178
  swig_type_info *from;
178
  swig_type_info *from;
179
  SCM smob = SWIG_Guile_GetSmob(s);
179
  SCM smob = SWIG_Guile_GetSmob(s);
180
180
181
  if (SCM_NULLP(smob)) {
181
  if (scm_is_null(smob)) {
182
    *result = NULL;
182
    *result = NULL;
183
    return SWIG_OK;
183
    return SWIG_OK;
184
  } else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
184
  } else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
Lines 240-246 Link Here
240
SWIG_Guile_MarkPointerNoncollectable(SCM s)
240
SWIG_Guile_MarkPointerNoncollectable(SCM s)
241
{
241
{
242
  SCM smob = SWIG_Guile_GetSmob(s);
242
  SCM smob = SWIG_Guile_GetSmob(s);
243
  if (!SCM_NULLP(smob)) {
243
  if (!scm_is_null(smob)) {
244
    if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
244
    if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
245
      SCM_SET_CELL_TYPE(smob, swig_tag);
245
      SCM_SET_CELL_TYPE(smob, swig_tag);
246
    }
246
    }
Lines 253-259 Link Here
253
SWIG_Guile_MarkPointerDestroyed(SCM s)
253
SWIG_Guile_MarkPointerDestroyed(SCM s)
254
{
254
{
255
  SCM smob = SWIG_Guile_GetSmob(s);
255
  SCM smob = SWIG_Guile_GetSmob(s);
256
  if (!SCM_NULLP(smob)) {
256
  if (!scm_is_null(smob)) {
257
    if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
257
    if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
258
      SCM_SET_CELL_TYPE(smob, swig_destroyed_tag);
258
      SCM_SET_CELL_TYPE(smob, swig_destroyed_tag);
259
    }
259
    }
Lines 481-500 Link Here
481
  int i;
481
  int i;
482
  int num_args_passed = 0;
482
  int num_args_passed = 0;
483
  for (i = 0; i<reqargs; i++) {
483
  for (i = 0; i<reqargs; i++) {
484
    if (!SCM_CONSP(rest))
484
    if (!scm_is_pair(rest))
485
      scm_wrong_num_args(scm_from_locale_string(procname ? (char *) procname : "unknown procedure"));
485
      scm_wrong_num_args(scm_from_locale_string(procname ? (char *) procname : "unknown procedure"));
486
    *dest++ = SCM_CAR(rest);
486
    *dest++ = SCM_CAR(rest);
487
    rest = SCM_CDR(rest);
487
    rest = SCM_CDR(rest);
488
    num_args_passed++;
488
    num_args_passed++;
489
  }
489
  }
490
  for (i = 0; i<optargs && SCM_CONSP(rest); i++) {
490
  for (i = 0; i<optargs && scm_is_pair(rest); i++) {
491
    *dest++ = SCM_CAR(rest);
491
    *dest++ = SCM_CAR(rest);
492
    rest = SCM_CDR(rest);
492
    rest = SCM_CDR(rest);
493
    num_args_passed++;
493
    num_args_passed++;
494
  }
494
  }
495
  for (; i<optargs; i++)
495
  for (; i<optargs; i++)
496
    *dest++ = SCM_UNDEFINED;
496
    *dest++ = SCM_UNDEFINED;
497
  if (!SCM_NULLP(rest))
497
  if (!scm_is_null(rest))
498
      scm_wrong_num_args(scm_from_locale_string(procname ? (char *) procname : "unknown procedure"));
498
      scm_wrong_num_args(scm_from_locale_string(procname ? (char *) procname : "unknown procedure"));
499
  return num_args_passed;
499
  return num_args_passed;
500
}
500
}
501
-- Lib/guile/typemaps.i
501
++ Lib/guile/typemaps.i
Lines 412-418 Link Here
412
%typecheck(SWIG_TYPECHECK_BOOL)
412
%typecheck(SWIG_TYPECHECK_BOOL)
413
	bool, bool&, const bool&
413
	bool, bool&, const bool&
414
{
414
{
415
  $1 = SCM_BOOLP($input) ? 1 : 0;
415
  $1 = scm_is_bool($input) ? 1 : 0;
416
}
416
}
417
417
418
%typecheck(SWIG_TYPECHECK_DOUBLE)
418
%typecheck(SWIG_TYPECHECK_DOUBLE)

Return to bug 491716