Home | History | Annotate | Download | only in Plugins

Lines Matching refs:bytes

411 static inline void swapIntsInHeader(uint8_t* bytes, unsigned length)
414 *(uint32_t*)(bytes + i) = OSSwapInt32(*(uint32_t *)(bytes + i));
419 Vector<uint8_t, 512> bytes([data length]);
420 memcpy(bytes.data(), [data bytes], bytes.size());
426 if (bytes.size() >= sizeof(struct mach_header_64)) {
427 uint32_t magic = *reinterpret_cast<uint32_t*>(bytes.data());
431 struct mach_header* header = (struct mach_header*)bytes.data();
433 // Check if we need to swap the bytes
435 swapIntsInHeader(bytes.data(), bytes.size());
444 struct mach_header_64* header = (struct mach_header_64*)bytes.data();
446 // Check if we need to swap the bytes
448 swapIntsInHeader(bytes.data(), bytes.size());
458 // Check if we need to swap the bytes
460 swapIntsInHeader(bytes.data(), bytes.size());
462 archs = (struct fat_arch*)(bytes.data() + sizeof(struct fat_header));
463 numArchs = ((struct fat_header *)bytes.data())->nfat_arch;
465 unsigned maxArchs = (bytes.size() - sizeof(struct fat_header)) / sizeof(struct fat_arch);