Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Erik Jansson
LabComm
Commits
38892389
Commit
38892389
authored
Apr 12, 2013
by
Sven Robertz
Browse files
changed prototype of labcomm_sizeof_sample to include signature_t
parent
7c208306
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/C_CodeGen.jrag
View file @
38892389
...
...
@@ -807,7 +807,7 @@ aspect C_Signature {
env.prefix + getName() + " = {");
env.indent();
env.println("LABCOMM_SAMPLE, \"" + getName() + "\",");
env.println("(int (*)(void *))labcomm_sizeof_" +
env.println("(int (*)(
labcomm_signature_t *,
void *))labcomm_sizeof_" +
env.prefix + getName() + ",");
env.println("sizeof(signature_bytes_" + getName() + "),");
env.println("signature_bytes_"+ getName());
...
...
@@ -905,7 +905,7 @@ aspect C_Sizeof {
public void SampleDecl.C_emitSizeofDeclaration(C_env env) {
env.println("extern int labcomm_sizeof_" + env.prefix + getName() +
"(" + env.prefix + getName() + " *v);");
"(
labcomm_signature_t *sig,
" + env.prefix + getName() + " *v);");
}
public int Decl.C_fixedSizeof() {
...
...
@@ -966,7 +966,7 @@ aspect C_Sizeof {
public void SampleDecl.C_emitSizeof(C_env env) {
env = env.nestStruct("(*v)");
env.println("int labcomm_sizeof_" + env.prefix + getName() +
"(" + env.prefix + getName() + " *v)");
"(
labcomm_signature_t *sig,
" + env.prefix + getName() + " *v)");
env.println("{");
env.indent();
if (C_isDynamic()) {
...
...
lib/c/labcomm.h
View file @
38892389
...
...
@@ -23,17 +23,14 @@ struct labcomm_decoder;
/*
* Signature entry
*/
typedef
struct
{
typedef
struct
labcomm_signature
{
int
type
;
char
*
name
;
int
(
*
encoded_size
)(
void
*
);
int
(
*
encoded_size
)(
struct
labcomm_signature
*
,
void
*
);
// void * == encoded_sample *
int
size
;
unsigned
char
*
signature
;
}
labcomm_signature_t
;
//TODO: something along the lines of...
void
labcomm_encode_signature
(
struct
labcomm_encoder
*
,
labcomm_signature_t
*
);
/*
* Error handling.
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment