swig/Examples/test-suite/c/cast_operator_runme.c
Vadim Zeitlin 690bf8e020 Replace SWIG_exit() with just exit() in test code
SWIG_exit() is not declared anywhere, so would need to be explicitly
declared to avoid warnings, while exit() can be declared just by
including <stdlib.h>, so prefer to use the latter, especially because
they're one and the same anyhow.
2019-07-24 20:47:59 +02:00

14 lines
238 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cast_operator/cast_operator_wrap.h"
int main() {
A *a = A_new();
if (strcmp(A_tochar(a), "hi"))
fprintf(stderr, "cast failed\n");
A_delete(a);
exit(0);
}