Module: Phonet_api
- Defined in:
- ext/phonet_api/phonet_wrap.c
Constant Summary collapse
- PHONET_FIRST_RULES =
SWIG_From_int((int)(0))
- PHONET_SECOND_RULES =
SWIG_From_int((int)(1024))
- PHONET_NO_LANGUAGE =
SWIG_From_int((int)(1))
- PHONET_GERMAN =
SWIG_From_int((int)(2))
- PHONET_DEFAULT_LANGUAGE =
SWIG_From_int((int)(2))
Class Method Summary collapse
Class Method Details
.initialize_phonet(*args) ⇒ Object
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 |
# File 'ext/phonet_api/phonet_wrap.c', line 1998
SWIGINTERN VALUE
_wrap_initialize_phonet(int argc, VALUE *argv, VALUE self) {
int result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
result = (int)initialize_phonet();
vresult = SWIG_From_int((int)(result));
return vresult;
fail:
return Qnil;
}
|
.phonet(*args) ⇒ Object
1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 |
# File 'ext/phonet_api/phonet_wrap.c', line 1944
SWIGINTERN VALUE
_wrap_phonet(int argc, VALUE *argv, VALUE self) {
char *arg1 ;
char *arg2 ;
int arg3 ;
int arg4 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
int val3 ;
int ecode3 = 0 ;
int val4 ;
int ecode4 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 4) || (argc > 4)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
}
res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char []","phonet", 1, argv[0] ));
}
arg1 = (char *)(buf1);
res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char []","phonet", 2, argv[1] ));
}
arg2 = (char *)(buf2);
ecode3 = SWIG_AsVal_int(argv[2], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","phonet", 3, argv[2] ));
}
arg3 = (int)(val3);
ecode4 = SWIG_AsVal_int(argv[3], &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","phonet", 4, argv[3] ));
}
arg4 = (int)(val4);
result = (int)phonet(arg1,arg2,arg3,arg4);
vresult = SWIG_From_int((int)(result));
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
return vresult;
fail:
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
return Qnil;
}
|
.set_phonet_language(*args) ⇒ Object
1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 |
# File 'ext/phonet_api/phonet_wrap.c', line 1920
SWIGINTERN VALUE
_wrap_set_phonet_language(int argc, VALUE *argv, VALUE self) {
int arg1 ;
int val1 ;
int ecode1 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
ecode1 = SWIG_AsVal_int(argv[0], &val1);
if (!SWIG_IsOK(ecode1)) {
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","set_phonet_language", 1, argv[0] ));
}
arg1 = (int)(val1);
result = (int)set_phonet_language(arg1);
vresult = SWIG_From_int((int)(result));
return vresult;
fail:
return Qnil;
}
|