summaryrefslogtreecommitdiff
path: root/src/bytecode/bytecode.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-10-22 22:21:19 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-10-22 22:21:19 +0000
commit6dbfc2658ce9fcbd808783211933c23f97d64dfb (patch)
tree87d8059b699a6e5c6f691710ad861b3274d8b174 /src/bytecode/bytecode.h
parent1c1524f649e0034c975a164a3074b9a0517a92b0 (diff)
downloadlibcss-6dbfc2658ce9fcbd808783211933c23f97d64dfb.tar.gz
libcss-6dbfc2658ce9fcbd808783211933c23f97d64dfb.tar.bz2
Something approximating an enumeration of the opcode-specific value field.
Some type-related pedantry, too. svn path=/trunk/libcss/; revision=5623
Diffstat (limited to 'src/bytecode/bytecode.h')
-rw-r--r--src/bytecode/bytecode.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bytecode/bytecode.h b/src/bytecode/bytecode.h
index c6ec839..c8d6215 100644
--- a/src/bytecode/bytecode.h
+++ b/src/bytecode/bytecode.h
@@ -128,12 +128,12 @@ typedef enum shape {
SHAPE_RECT = 0
} shape;
-static inline uint32_t buildOPV(uint16_t opcode, uint8_t flags, uint16_t value)
+static inline uint32_t buildOPV(opcode opcode, uint8_t flags, uint16_t value)
{
return (opcode & 0x3ff) | (flags << 10) | ((value & 0x3fff) << 18);
}
-static inline uint16_t getOpcode(uint32_t OPV)
+static inline opcode getOpcode(uint32_t OPV)
{
return (OPV & 0x3ff);
}