Package org.renjin.gcc.runtime

Examples of org.renjin.gcc.runtime.CharPtr.asString()


    Class clazz = compile("chars.c", "Chars");

    Method method = clazz.getMethod("circle_name");
    CharPtr ptr = (CharPtr) method.invoke(null);

    assertThat(ptr.asString(), equalTo("Hello world"));

    method = clazz.getMethod("test_first_char");
    Integer result = (Integer) method.invoke(null);

    assertThat(result, equalTo((int) 'h'));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.