diff options
author | Petr Machata <pmachata@redhat.com> | 2012-01-07 01:04:40 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-08-29 19:02:07 +0200 |
commit | 4767187d0d7924bfe5028fe3e29e3b018bc9c99b (patch) | |
tree | f4aad6f467d1979528a5070181358b60bb480c4f /type.c | |
parent | 940ec0650bfe0f1deda96d3561be3d0006df92fc (diff) | |
download | ltrace-4767187d0d7924bfe5028fe3e29e3b018bc9c99b.tar.gz |
Add value_string_to_charp
- I consider this a temporary solution before ARGTYPE_STRING is removed.
Since we need to handle strings as array(char, zero)*, it's necessary to
do this conversion by hand every once in a while. This code implements
such transformation.
Diffstat (limited to 'type.c')
-rw-r--r-- | type.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -397,6 +397,8 @@ type_sizeof(struct Process *proc, struct arg_type_info *type) return (size_t)-1; return size; + case ARGTYPE_STRING_N: + /* String is a char* in disguise. */ case ARGTYPE_POINTER: return sizeof(void *); @@ -430,9 +432,6 @@ type_sizeof(struct Process *proc, struct arg_type_info *type) case ARGTYPE_OCTAL: case ARGTYPE_UNKNOWN: return sizeof(long); - - case ARGTYPE_STRING_N: - return -1; } abort(); |