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.
14 lines
238 B
C
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);
|
|
}
|
|
|