/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/SimpleTypeSystem.c

  • Committer: Gustav Hartvigsson
  • Date: 2014-11-24 13:59:19 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: gustav.hartvigsson@gmail.com-20141124135919-3x0u978u98uzjmet
* Copied over LinkedList and DynamicArray from c_sdl_js

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
  return SIMPLE_TYPE_SYSTEM_VERSION_PATCH;
46
46
}
47
47
 
48
 
char * s_string_new (const char * s) {
49
 
  char * ret_val = strdup (s);
50
 
  free (s);
51
 
  return ret_val;
52
 
}
53
 
 
54
 
char * s_string_new_with_len (const char * s, size_t len) {
55
 
  char * ret_val = malloc (len + 1);
56
 
  strncpy (ret_val, s, len);
57
 
  free (s);
58
 
  return ret_val;
59
 
}
60
 
 
61
 
void s_print (const char * string) {
62
 
  fprintf (stdout, string);
63
 
}