[guile] Fix the guile examples on 64-bit platforms.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10074 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3acd5c2d94
commit
97ce2ae61a
5 changed files with 11 additions and 17 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
Version 1.3.32 (in progress)
|
Version 1.3.32 (in progress)
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
10/30/2007: olly
|
||||||
|
[guile] Fix the guile examples on 64-bit platforms.
|
||||||
|
|
||||||
10/29/2007: wsfulton
|
10/29/2007: wsfulton
|
||||||
[C#] Fix member pointers on 64 bit platforms.
|
[C#] Fix member pointers on 64 bit platforms.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
double x;
|
|
||||||
double y;
|
|
||||||
double z;
|
|
||||||
double w;
|
|
||||||
} Vector;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -12,6 +12,7 @@ double get_m(double **M, int i, int j) {
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%inline {
|
||||||
/*** Matrix Operations ***/
|
/*** Matrix Operations ***/
|
||||||
|
|
||||||
extern double **new_matrix();
|
extern double **new_matrix();
|
||||||
|
|
@ -32,7 +33,4 @@ extern double get_m(double **M, int i, int j);
|
||||||
extern void mat_mult(double **a, double **b, double **c);
|
extern void mat_mult(double **a, double **b, double **c);
|
||||||
/* Multiplies matrix a by b and places the result in c*/
|
/* Multiplies matrix a by b and places the result in c*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
#include "vector.h"
|
#include "vector.h"
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%inline {
|
||||||
|
|
||||||
extern Vector *createv(double x,double y,double z,double w);
|
extern Vector *createv(double x,double y,double z,double w);
|
||||||
/* Creates a new vector v(x,y,z,w) */
|
/* Creates a new vector v(x,y,z,w) */
|
||||||
|
|
||||||
|
|
@ -17,5 +19,4 @@ extern void printv(Vector *v);
|
||||||
extern void transform(double **T, Vector *v, Vector *t);
|
extern void transform(double **T, Vector *v, Vector *t);
|
||||||
/* Transforms vector c to vector t by M*v --> t */
|
/* Transforms vector c to vector t by M*v --> t */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,9 @@ extern int count(char *bytes, int len, char c);
|
||||||
/* This example shows how to wrap a function that mutates a string */
|
/* This example shows how to wrap a function that mutates a string */
|
||||||
|
|
||||||
%typemap(in) (char *str, int len) {
|
%typemap(in) (char *str, int len) {
|
||||||
$1 = gh_scm2newstr($input,&$2);
|
size_t temp;
|
||||||
|
$1 = gh_scm2newstr($input,&temp);
|
||||||
|
$2 = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the mutated string as a new object. */
|
/* Return the mutated string as a new object. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue