[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Török Edvin edwin at clamav.net
Sun Apr 4 01:02:32 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit c466339d019555212670a445fc2136a75536374f
Author: Török Edvin <edwin at clamav.net>
Date:   Fri Aug 28 18:41:50 2009 +0300

    Rename enum member to not clash with type names.

diff --git a/libclamav/bytecode.c b/libclamav/bytecode.c
index a4f1375..db9d12d 100644
--- a/libclamav/bytecode.c
+++ b/libclamav/bytecode.c
@@ -456,7 +456,7 @@ static void add_static_types(struct cli_bc *bc)
 {
     unsigned i;
     for (i=0;i<NUM_STATIC_TYPES;i++) {
-	bc->types[i].kind = PointerType;
+	bc->types[i].kind = DPointerType;
 	bc->types[i].numElements = 1;
 	bc->types[i].containedTypes = &containedTy[i];
 	bc->types[i].size = bc->types[i].align = sizeof(void*);
@@ -488,7 +488,7 @@ static int parseTypes(struct cli_bc *bc, unsigned char *buffer)
 	}
 	switch (t) {
 	    case 1:
-		ty->kind = FunctionType;
+		ty->kind = DFunctionType;
 		ty->size = ty->align = sizeof(void*);
 		parseType(bc, ty, buffer, &offset, len, &ok);
 		if (!ok) {
@@ -498,7 +498,7 @@ static int parseTypes(struct cli_bc *bc, unsigned char *buffer)
 		break;
 	    case 2:
 	    case 3:
-		ty->kind = (t == 2) ? StructType : PackedStructType;
+		ty->kind = (t == 2) ? DStructType : DPackedStructType;
 		ty->size = ty->align = 0;/* TODO:calculate size/align of structs */
 		parseType(bc, ty, buffer, &offset, len, &ok);
 		if (!ok) {
@@ -507,7 +507,7 @@ static int parseTypes(struct cli_bc *bc, unsigned char *buffer)
 		}
 		break;
 	    case 4:
-		ty->kind = ArrayType;
+		ty->kind = DArrayType;
 		/* number of elements of array, not subtypes! */
 		ty->numElements = readNumber(buffer, &offset, len, &ok);
 		if (!ok) {
@@ -517,7 +517,7 @@ static int parseTypes(struct cli_bc *bc, unsigned char *buffer)
 		/* fall-through */
 	    case 5:
 		if (t == 5) {
-		    ty->kind = PointerType;
+		    ty->kind = DPointerType;
 		    ty->numElements = 1;
 		}
 		ty->containedTypes = cli_malloc(sizeof(*ty->containedTypes));
diff --git a/libclamav/bytecode2llvm.cpp b/libclamav/bytecode2llvm.cpp
index c11aa67..34102be 100644
--- a/libclamav/bytecode2llvm.cpp
+++ b/libclamav/bytecode2llvm.cpp
@@ -214,7 +214,7 @@ public:
 	PrettyStackTraceString Trace(BytecodeID.str().c_str());
 	convertTypes();
 
-	llvm::FunctionType *FTy = FunctionType::get(Type::getVoidTy(Context),
+	FunctionType *FTy = FunctionType::get(Type::getVoidTy(Context),
 						    false);
 	Function *FHandler = Function::Create(FTy, Function::InternalLinkage,
 					      "clamjit.fail", M);
@@ -233,7 +233,7 @@ public:
 		argTypes.push_back(mapType(func->types[a]));
 	    }
 	    const Type *RetTy = mapType(func->returnType);
-	    llvm::FunctionType *FTy =  FunctionType::get(RetTy, argTypes,
+	    FunctionType *FTy =  FunctionType::get(RetTy, argTypes,
 							 false);
 	    Functions[j] = Function::Create(FTy, Function::InternalLinkage, 
 					   BytecodeID+"f"+Twine(j), M);
@@ -461,7 +461,7 @@ public:
 
 	DEBUG(M->dump());
 	delete [] TypeMap;
-	llvm::FunctionType *Callable = FunctionType::get(Type::getInt32Ty(Context),false);
+	FunctionType *Callable = FunctionType::get(Type::getInt32Ty(Context),false);
 	for (unsigned j=0;j<bc->num_func;j++) {
 	    const struct cli_bc_func *func = &bc->funcs[j];
 	    PrettyStackTraceString CrashInfo2("Native machine codegen");
diff --git a/libclamav/bytecode_api_decl.c b/libclamav/bytecode_api_decl.c
index fe23bbe..c034a48 100644
--- a/libclamav/bytecode_api_decl.c
+++ b/libclamav/bytecode_api_decl.c
@@ -29,10 +29,10 @@ static uint16_t cli_tmp2[]={70};
 static uint16_t cli_tmp3[]={32, 32, 32};
 
 const struct cli_bc_type cli_apicall_types[]={
-	{FunctionType, cli_tmp0, 3},
-	{PointerType, cli_tmp1, 1},
-	{StructType, cli_tmp2, 1},
-	{FunctionType, cli_tmp3, 3}
+	{DFunctionType, cli_tmp0, 3},
+	{DPointerType, cli_tmp1, 1},
+	{DStructType, cli_tmp2, 1},
+	{DFunctionType, cli_tmp3, 3}
 };
 
 const unsigned cli_apicall_maxtypes=sizeof(cli_apicall_types)/sizeof(cli_apicall_types[0]);
diff --git a/libclamav/type_desc.h b/libclamav/type_desc.h
index ceded66..fa8c7ef 100644
--- a/libclamav/type_desc.h
+++ b/libclamav/type_desc.h
@@ -23,11 +23,11 @@
 #define TYPE_DESC_H
 
 enum derived_t {
-  FunctionType,
-  PointerType,
-  StructType,
-  PackedStructType,
-  ArrayType
+  DFunctionType,
+  DPointerType,
+  DStructType,
+  DPackedStructType,
+  DArrayType
 };
 
 struct cli_bc_type {

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list