Author Topic: Rev. 9438 question  (Read 7132 times)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Rev. 9438 question
« on: November 08, 2013, 02:49:14 pm »
By this new method, if we have __UnnamedStruct111 and file #1 this is the 11th unnamed struct, but file #11 has unnamed struct 1.  Are they merged?  Should we instead use unnamedTmp.Printf(_T("%s%s%lu_%lu"), ...) so we have __UnnamedStruct1_11 and __UnnamedStruct11_1 ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Rev. 9438 question
« Reply #1 on: November 08, 2013, 03:16:20 pm »
I think we must find a way to remove these __UnnamedStruct entries at all...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ToApolytoXaos

  • Guest
Re: Rev. 9438 question
« Reply #2 on: November 08, 2013, 04:04:40 pm »
By this new method, if we have __UnnamedStruct111 and file #1 this is the 11th unnamed struct, but file #11 has unnamed struct 1.  Are they merged?  Should we instead use unnamedTmp.Printf(_T("%s%s%lu_%lu"), ...) so we have __UnnamedStruct1_11 and __UnnamedStruct11_1 ?
Alpha, may I ask where did you find this? I'm interested in such peculiar things and I would like to take a look at it.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Rev. 9438 question
« Reply #3 on: November 08, 2013, 06:54:18 pm »
Relevant changes are:
Code
http://cb.biplab.in/websvn/comp.php?repname=codeblocks&compare[]=/@9437&compare[]=/@9438
(Found when reading through the log messages.)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Rev. 9438 question
« Reply #4 on: November 09, 2013, 03:18:39 pm »
By this new method, if we have __UnnamedStruct111 and file #1 this is the 11th unnamed struct, but file #11 has unnamed struct 1.  Are they merged?  Should we instead use unnamedTmp.Printf(_T("%s%s%lu_%lu"), ...) so we have __UnnamedStruct1_11 and __UnnamedStruct11_1 ?
Hi, Alpha, thanks for the review, indeed this is a bug. I fix this bug in rev 9443 by adding an underscore between file index and token index.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.