diff --git a/example/main/c/main.c b/example/main/c/main.c index 8eaefc3..c75d457 100644 --- a/example/main/c/main.c +++ b/example/main/c/main.c @@ -62,7 +62,7 @@ plugin_main () handle_error (); println ("Saying hi!"); - string_t hi; + const char *hi; if (!one.hi (&hi, "Adam")) handle_error (); diff --git a/trixy-types/src/c_headers/string.h b/trixy-types/src/c_headers/string.h index 1b22c4e..68c8e05 100644 --- a/trixy-types/src/c_headers/string.h +++ b/trixy-types/src/c_headers/string.h @@ -23,15 +23,8 @@ #define TRIXY_STRING_H /** - * @brief This string type is allocated by rust, which means that you can't - * just free it from c, but need to return it to rust to be freed. - * @see the `string_free` method + * @brief Frees a rust-allocated string. */ -typedef const char *string_t; - -/** - * @brief The free function for rust stings - */ -extern int string_free (string_t string); +extern int string_free (const char *string); #endif // TRIXY_STRING_H