Function clingo_sys::clingo_add_string [] [src]

pub unsafe extern "C" fn clingo_add_string(
    string: *const c_char,
    result: *mut *const c_char
) -> bool

Internalize a string.

This functions takes a string as input and returns an equal unique string that is (at the moment) not freed until the program is closed. All strings returned from clingo API functions are internalized and must not be freed.

Parameters:

  • string - the string to internalize
  • result - the internalized string

Returns whether the call was successful; might set one of the following error codes:

  • ::clingo_error_bad_alloc