[augeas-devel] augeas: master - * src/info.h: optimize layout of struct info
David Lutterkort
lutter at fedoraproject.org
Thu Oct 1 00:23:39 UTC 2009
Gitweb: http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=9db81ed0a5e5b52c01f90d8531eda48b1373fbb2
Commit: 9db81ed0a5e5b52c01f90d8531eda48b1373fbb2
Parent: b907cac661fd93b36e7878e6cb937b08106fd59c
Author: David Lutterkort <lutter at redhat.com>
AuthorDate: Wed Sep 30 14:32:03 2009 -0700
Committer: David Lutterkort <lutter at redhat.com>
CommitterDate: Wed Sep 30 17:16:10 2009 -0700
* src/info.h: optimize layout of struct info
---
src/info.h | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/info.h b/src/info.h
index 09f62d3..c2ca2d1 100644
--- a/src/info.h
+++ b/src/info.h
@@ -24,11 +24,13 @@
#define INFO_H_
#include <stdio.h>
+#include <stdint.h>
+#include "ref.h"
/* Reference-counted strings */
struct string {
- unsigned int ref;
- char *str;
+ ref_t ref;
+ char *str;
};
struct string *make_string(char *str);
@@ -41,12 +43,12 @@ void free_string(struct string *string);
/* File information */
struct info {
- unsigned int ref;
struct string *filename;
- unsigned int first_line;
- unsigned int first_column;
- unsigned int last_line;
- unsigned int last_column;
+ uint16_t first_line;
+ uint16_t first_column;
+ uint16_t last_line;
+ uint16_t last_column;
+ ref_t ref;
};
char *format_info(struct info *info);
More information about the augeas-devel
mailing list