Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sven Gestegård Robertz
LabComm
Commits
38892389
Commit
38892389
authored
12 years ago
by
Sven Robertz
Browse files
Options
Downloads
Patches
Plain Diff
changed prototype of labcomm_sizeof_sample to include signature_t
parent
7c208306
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
compiler/C_CodeGen.jrag
+3
-3
3 additions, 3 deletions
compiler/C_CodeGen.jrag
lib/c/labcomm.h
+2
-5
2 additions, 5 deletions
lib/c/labcomm.h
with
5 additions
and
8 deletions
compiler/C_CodeGen.jrag
+
3
−
3
View file @
38892389
...
@@ -807,7 +807,7 @@ aspect C_Signature {
...
@@ -807,7 +807,7 @@ aspect C_Signature {
env.prefix + getName() + " = {");
env.prefix + getName() + " = {");
env.indent();
env.indent();
env.println("LABCOMM_SAMPLE, \"" + getName() + "\",");
env.println("LABCOMM_SAMPLE, \"" + getName() + "\",");
env.println("(int (*)(void *))labcomm_sizeof_" +
env.println("(int (*)(
labcomm_signature_t *,
void *))labcomm_sizeof_" +
env.prefix + getName() + ",");
env.prefix + getName() + ",");
env.println("sizeof(signature_bytes_" + getName() + "),");
env.println("sizeof(signature_bytes_" + getName() + "),");
env.println("signature_bytes_"+ getName());
env.println("signature_bytes_"+ getName());
...
@@ -905,7 +905,7 @@ aspect C_Sizeof {
...
@@ -905,7 +905,7 @@ aspect C_Sizeof {
public void SampleDecl.C_emitSizeofDeclaration(C_env env) {
public void SampleDecl.C_emitSizeofDeclaration(C_env env) {
env.println("extern int labcomm_sizeof_" + env.prefix + getName() +
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() {
public int Decl.C_fixedSizeof() {
...
@@ -966,7 +966,7 @@ aspect C_Sizeof {
...
@@ -966,7 +966,7 @@ aspect C_Sizeof {
public void SampleDecl.C_emitSizeof(C_env env) {
public void SampleDecl.C_emitSizeof(C_env env) {
env = env.nestStruct("(*v)");
env = env.nestStruct("(*v)");
env.println("int labcomm_sizeof_" + env.prefix + getName() +
env.println("int labcomm_sizeof_" + env.prefix + getName() +
"(" + env.prefix + getName() + " *v)");
"(
labcomm_signature_t *sig,
" + env.prefix + getName() + " *v)");
env.println("{");
env.println("{");
env.indent();
env.indent();
if (C_isDynamic()) {
if (C_isDynamic()) {
...
...
This diff is collapsed.
Click to expand it.
lib/c/labcomm.h
+
2
−
5
View file @
38892389
...
@@ -23,17 +23,14 @@ struct labcomm_decoder;
...
@@ -23,17 +23,14 @@ struct labcomm_decoder;
/*
/*
* Signature entry
* Signature entry
*/
*/
typedef
struct
{
typedef
struct
labcomm_signature
{
int
type
;
int
type
;
char
*
name
;
char
*
name
;
int
(
*
encoded_size
)(
void
*
);
int
(
*
encoded_size
)(
struct
labcomm_signature
*
,
void
*
);
// void * == encoded_sample *
int
size
;
int
size
;
unsigned
char
*
signature
;
unsigned
char
*
signature
;
}
labcomm_signature_t
;
}
labcomm_signature_t
;
//TODO: something along the lines of...
void
labcomm_encode_signature
(
struct
labcomm_encoder
*
,
labcomm_signature_t
*
);
/*
/*
* Error handling.
* Error handling.
*/
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment