Go Back   ZeroC Forums > Patches

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 08-19-2004
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 889
Patch for slice2java, v1.5.1

slice2java in v1.5.1 and earlier generates incorrect constant definitions for byte constants. Please apply the following patch to slice2java/Gen.cpp to fix this.

Cheers,

Michi.

diff -r1.151 Gen.cpp
2241c2241,2246
< out << p->value() << " -128"; // Slice byte runs from 0-255, Java byte runs from -128 - 127.
---
> int i = atoi(p->value().c_str());
> if(i > 127)
> {
> i -= 256;
> }
> out << i; // Slice byte runs from 0-255, Java byte runs from -128 - 127.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
slice2java ChenQingQing Help Center 4 09-25-2006 03:20 AM
Where is slice2java dashie Help Center 7 09-04-2006 06:21 AM
Patch to slice2java to make it generate Java 1.5 enums mefoster Patches 1 06-30-2006 02:32 PM
Patch for slice2cpp and slice2java michi Patches 0 03-25-2004 11:27 PM
slice2java alexander Bug Reports 6 12-16-2003 01:15 PM


All times are GMT -4. The time now is 07:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.