summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2005-01-06 07:45:17 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2005-01-06 07:45:17 +0000
commit5135d37813fe23a3a1ea19c6e116933052faf1b3 (patch)
tree89d2c592e028fd407862f9646f750f51b54353e3 /src
parented1fc20199856d20f904f3d2c3d0f8b40e485fc2 (diff)
solved classic "char*" vs "char[]" conflict. we were mimicking a pointer variable at desired location and then we took its address. using array is more intuitive, as they give us the starting address instantly.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/tnl/t_vtx_x86.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/tnl/t_vtx_x86.c b/src/mesa/tnl/t_vtx_x86.c
index 37530f4940..38cdad451c 100644
--- a/src/mesa/tnl/t_vtx_x86.c
+++ b/src/mesa/tnl/t_vtx_x86.c
@@ -48,8 +48,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#if defined(USE_X86_ASM) && !defined(HAVE_NONSTANDARD_GLAPIENTRY)
#define EXTERN( FUNC ) \
-extern const char *FUNC; \
-extern const char *FUNC##_end
+extern const char FUNC[]; \
+extern const char FUNC##_end[]
EXTERN( _tnl_x86_Attribute1fv );
EXTERN( _tnl_x86_Attribute2fv );
@@ -84,8 +84,8 @@ EXTERN( _tnl_x86_choose_fv );
#define DFN( FUNC, CACHE, KEY ) \
struct _tnl_dynfn *dfn = MALLOC_STRUCT( _tnl_dynfn );\
- char *start = (char *)&FUNC; \
- char *end = (char *)&FUNC##_end; \
+ const char *start = FUNC; \
+ const char *end = FUNC##_end; \
int offset = 0; \
insert_at_head( &CACHE, dfn ); \
dfn->key = KEY; \
@@ -273,8 +273,8 @@ void _tnl_InitX86Codegen( struct _tnl_dynfn_generators *gen )
#define MKDISP(FUNC, SIZE, ATTR, WARP) \
do { \
char *code; \
- char *start = (char *)&WARP; \
- char *end = (char *)&WARP##_end; \
+ const char *start = WARP; \
+ const char *end = WARP##_end; \
int offset = 0; \
code = ALIGN_MALLOC( end - start, 16 ); \
memcpy (code, start, end - start); \
@@ -347,8 +347,8 @@ void _tnl_x86choosers( tnl_attrfv_func (*choose)[4],
for (attr = 0; attr < _TNL_MAX_ATTR_CODEGEN; attr++) {
for (size = 0; size < 4; size++) {
char *code;
- char *start = (char *)&_tnl_x86_choose_fv;
- char *end = (char *)&_tnl_x86_choose_fv_end;
+ const char *start = _tnl_x86_choose_fv;
+ const char *end = _tnl_x86_choose_fv_end;
int offset = 0;
code = ALIGN_MALLOC( end - start, 16 );
memcpy (code, start, end - start);