[#83328] tcltklib and not init'ing tk — aakhter@... (Aamer Akhter)

Hello,

13 messages 2003/10/01

[#83391] mixing in class methods — "Mark J. Reed" <markjreed@...>

Okay, probably a dumb question, but: is there any way to define

22 messages 2003/10/01
[#83392] Re: mixing in class methods — Ryan Pavlik <rpav@...> 2003/10/01

On Thu, 2 Oct 2003 06:02:32 +0900

[#83397] Re: mixing in class methods — Gavin Sinclair <gsinclair@...> 2003/10/01

On Thursday, October 2, 2003, 7:08:00 AM, Ryan wrote:

[#83399] Re: mixing in class methods — "Mark J. Reed" <markjreed@...> 2003/10/02

On Thu, Oct 02, 2003 at 07:37:25AM +0900, Gavin Sinclair wrote:

[#83404] Re: mixing in class methods — "Gavin Sinclair" <gsinclair@...> 2003/10/02

> On Thu, Oct 02, 2003 at 07:37:25AM +0900, Gavin Sinclair wrote:

[#83416] C or C++? — "Joe Cheng" <code@...>

I'd like to start writing Ruby extensions. Does it make a difference

32 messages 2003/10/02
[#83435] Re: C or C++? — "Aleksei Guzev" <aleksei.guzev@...> 2003/10/02

[#83448] xml in Ruby — paul vudmaska <paul_vudmaska@...> 2003/10/02

The biggest problem i have with Ruby is the sleepness

[#83455] Re: xml in Ruby — Chad Fowler <chad@...> 2003/10/02

On Thu, 2 Oct 2003, paul vudmaska wrote:

[#83464] Re: xml in Ruby or no xml it's just a question — paul vudmaska <paul_vudmaska@...> 2003/10/02

>>--------

[#83470] Re: xml in Ruby — paul vudmaska <paul_vudmaska@...>

>>>

15 messages 2003/10/02

[#83551] xml + ruby — paul vudmaska <paul_vudmaska@...>

>>---------

20 messages 2003/10/03
[#83562] Re: xml + ruby — Austin Ziegler <austin@...> 2003/10/03

On Fri, 3 Oct 2003 16:11:46 +0900, paul vudmaska wrote:

[#83554] hash of hashes — Paul Argentoff <argentoff@...>

Hi all.

18 messages 2003/10/03

[#83675] fox-tool - interactive gui builder for fxruby — henon <user@...>

hi fellows,

15 messages 2003/10/05

[#83730] Re: Enumerable#inject is surprising me... — "Weirich, James" <James.Weirich@...>

> Does it surprise you?

17 messages 2003/10/06
[#83732] Re: Enumerable#inject is surprising me... — nobu.nokada@... 2003/10/07

Hi,

[#83801] Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...>

OK. So I'm going to write a text editor for my masters' thesis. The

35 messages 2003/10/08
[#83803] Re: Extension Language for a Text Editor — Ryan Pavlik <rpav@...> 2003/10/08

On Thu, 9 Oct 2003 05:06:32 +0900

[#83806] Re: Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...> 2003/10/08

* Ryan Pavlik <rpav@mephle.com> [Oct, 08 2003 22:30]:

[#83812] Re: Extension Language for a Text Editor — Ryan Pavlik <rpav@...> 2003/10/08

On Thu, 9 Oct 2003 06:09:29 +0900

[#83955] Re: Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...> 2003/10/09

* Ryan Pavlik <rpav@mephle.com> [Oct, 09 2003 09:10]:

[#84169] General Ruby Programming questions — Simon Kitching <simon@...>

21 messages 2003/10/15
[#84170] Re: General Ruby Programming questions — Florian Gross <flgr@...> 2003/10/15

Simon Kitching wrote:

[#84172] Re: General Ruby Programming questions — Simon Kitching <simon@...> 2003/10/15

Hi Florian..

[#84331] Re: Email Harvesting — Greg Vaughn <gvaughn@...>

Ryan Dlugosz said:

17 messages 2003/10/21
[#84335] Re: Email Harvesting — Hugh Sasse Staff Elec Eng <hgs@...> 2003/10/21

On Wed, 22 Oct 2003, Greg Vaughn wrote:

[#84343] Re: Email Harvesting — Ruben Vandeginste <Ruben.Vandeginste@...> 2003/10/22

On Wed, 22 Oct 2003 08:35:32 +0900, Hugh Sasse Staff Elec Eng

[#84341] Ruby-oriented Linux distro? — Hal Fulton <hal9000@...>

There's been some talk of something like this in the past.

15 messages 2003/10/22
[#84348] Re: Ruby-oriented Linux distro? — Gavin Sinclair <gsinclair@...> 2003/10/22

On Wednesday, October 22, 2003, 6:01:16 PM, Hal wrote:

[#84351] Re: Ruby-oriented Linux distro? — Andrew Walrond <andrew@...> 2003/10/22

On Wednesday 22 Oct 2003 11:02 am, Gavin Sinclair wrote:

[#84420] Struggling with variable arguments to block — "Gavin Sinclair" <gsinclair@...>

Hi -talk,

18 messages 2003/10/24
[#84428] Re: Struggling with variable arguments to block — matz@... (Yukihiro Matsumoto) 2003/10/24

Hi,

[#84604] ruby-dev summary 21637-21729 — Takaaki Tateishi <ttate@...>

Hello,

21 messages 2003/10/30
[#84787] Re: ruby-dev summary 21637-21729 — Paul Brannan <pbrannan@...> 2003/11/06

On Fri, Oct 31, 2003 at 07:01:28AM +0900, Takaaki Tateishi wrote:

[#84789] Re: ruby-dev summary 21637-21729 — matz@... (Yukihiro Matsumoto) 2003/11/06

Hi,

[#84792] Re: ruby-dev summary 21637-21729 — Paul Brannan <pbrannan@...> 2003/11/06

On Thu, Nov 06, 2003 at 11:17:59PM +0900, Yukihiro Matsumoto wrote:

[#84794] Re: ruby-dev summary 21637-21729 — matz@... (Yukihiro Matsumoto) 2003/11/06

Hi,

Re: Win32OLE again

From: Steve Tuckner <STUCKNER@...>
Date: 2003-10-29 16:56:29 UTC
List: ruby-talk #84548

Ok here are some bizarre results.

When I reduce my script to just a require and a new call, and I reduce the
extension to defining one real method, then I can make it fail depending on
how many other methods I define. In my Init_win32ole2 function, I define n
dummy methods. If I define 35 or below of them, it will get through the new
call. If I define 36 or above of them it will segfault.  I found this by
discovering that if I commented out some of the method, class, etc,
definitions in the real Init_win32ole function, then it started to work.

My build environment is Visual C++ 6. The makefile was generated by the
extconf.rb that came with win32ole. I just modified it to use win32ole2
instead.

Does anyone have any ideas what is going wrong here or how I should proceed
further? I feel that I have reduced it down to the bare minimum so there
must be something simple that is not being done for 1.8. This test works in
1.6 with values as high as 1000.

Thanks,

Steve Tuckner

> -----Original Message-----
> From: ts [mailto:decoux@moulon.inra.fr]
> Sent: Wednesday, October 29, 2003 5:35 AM
> To: ruby-talk ML
> Cc: ruby-talk@ruby-lang.org
> Subject: Re: Win32OLE again
>
>
> >>>>> "S" == Steve Tuckner <STUCKNER@MULTITECH.COM> writes:
>
> S> Please anyone who has written C extensions or the author
> of Win32OLE,
> S> let me know what is wrong with calling free on pointers
> allocated with
> S> ALLOC_N.
>
>  Well there is nothing wrong with calling free with ALLOC_N
> because like
>  you've found ALLOC_N is just a call to malloc().
>
>  But if it exist an error in the C extensions (bad memory management
>  *elsewhere*) then the memory pool can be corrupted and this
> can explain
>  the crash.
>
>  Perhaps the error is in the extension Win32OLE (well, I
> don't know what
>  do this extension and I've not looked at the source)
>
>
> Guy Decoux
>
>
>
>
>
>
>
>




=0A=
SHELL =3D /bin/sh=0A=
=0A=
#### Start of system configuration section. ####=0A=
=0A=
srcdir =3D .=0A=
topdir =3D $(rubylibdir)/$(arch)=0A=
hdrdir =3D $(rubylibdir)/$(arch)=0A=
VPATH =3D $(srcdir)=0A=
=0A=
DESTDIR =3D d:=0A=
prefix =3D $(DESTDIR)/a/ruby180=0A=
exec_prefix =3D $(prefix)=0A=
bindir =3D $(exec_prefix)/bin=0A=
sitelibdir =3D $(sitedir)/$(ruby_version)=0A=
datadir =3D $(prefix)/share=0A=
sitedir =3D $(prefix)/lib/ruby/site_ruby=0A=
sharedstatedir =3D $(DESTDIR)/etc=0A=
archdir =3D $(rubylibdir)/$(arch)=0A=
localstatedir =3D $(DESTDIR)/var=0A=
infodir =3D $(prefix)/info=0A=
oldincludedir =3D $(DESTDIR)/usr/include=0A=
libexecdir =3D $(exec_prefix)/libexec=0A=
compile_dir =3D =
$(DESTDIR)/pp/ruby/installer/ruby180/download/ruby/win32=0A=
sbindir =3D $(exec_prefix)/sbin=0A=
includedir =3D $(prefix)/include=0A=
sysconfdir =3D $(prefix)/etc=0A=
sitearchdir =3D $(sitelibdir)/$(sitearch)=0A=
mandir =3D $(prefix)/man=0A=
libdir =3D $(exec_prefix)/lib=0A=
rubylibdir =3D $(libdir)/ruby/$(ruby_version)=0A=
=0A=
CC =3D cl -nologo=0A=
LIBRUBY =3D $(RUBY_SO_NAME).lib=0A=
LIBRUBY_A =3D $(RUBY_SO_NAME)-static.lib=0A=
LIBRUBYARG_SHARED =3D $(LIBRUBY)=0A=
LIBRUBYARG_STATIC =3D $(LIBRUBY_A)=0A=
=0A=
CFLAGS   =3D  /W3 =0A=
CPPFLAGS =3D -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)  -I. -I./.. =
-I./../missing=0A=
CXXFLAGS =3D $(CFLAGS) =0A=
DLDFLAGS =3D  -link -incremental:no -pdb:none -dll $(LIBPATH) =
-def:$(DEFFILE) =0A=
LDSHARED =3D cl -nologo -LD=0A=
AR =3D lib -nologo=0A=
EXEEXT =3D .exe=0A=
=0A=
RUBY_INSTALL_NAME =3D ruby=0A=
RUBY_SO_NAME =3D msvcrt-ruby18=0A=
arch =3D i386-mswin32=0A=
sitearch =3D i386-msvcrt=0A=
ruby_version =3D 1.8=0A=
RUBY =3D ruby=0A=
RM =3D $(RUBY) -rftools -e "File::rm_f(*ARGV.map =
do|x|Dir[x]end.flatten.uniq)"=0A=
MAKEDIRS =3D $(RUBY) -r ftools -e 'File::makedirs(*ARGV)'=0A=
INSTALL_PROG =3D $(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], =
0755, true)'=0A=
INSTALL_DATA =3D $(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], =
0644, true)'=0A=
=0A=
#### End of system configuration section. ####=0A=
=0A=
=0A=
LIBPATH =3D  -libpath:"$(libdir)"=0A=
DEFFILE =3D win32ole2.def=0A=
=0A=
CLEANFILES =3D =0A=
DISTCLEANFILES =3D =0A=
=0A=
target_prefix =3D =0A=
LOCAL_LIBS =3D =0A=
LIBS =3D $(LIBRUBYARG_SHARED) advapi32.lib user32.lib uuid.lib =
oleaut32.lib ole32.lib  oldnames.lib user32.lib advapi32.lib =
wsock32.lib  =0A=
OBJS =3D win32ole2.obj=0A=
TARGET =3D win32ole2=0A=
DLLIB =3D $(TARGET).so=0A=
=0A=
RUBYCOMMONDIR =3D $(sitedir)$(target_prefix)=0A=
RUBYLIBDIR    =3D $(sitelibdir)$(target_prefix)=0A=
RUBYARCHDIR   =3D $(sitearchdir)$(target_prefix)=0A=
=0A=
CLEANLIBS     =3D "$(TARGET).{lib,exp,il?,tds,map}" $(DLLIB)=0A=
CLEANOBJS     =3D "*.{obj,lib,s[ol],pdb,bak}"=0A=
=0A=
all:		$(DLLIB)=0A=
=0A=
clean:=0A=
		@$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)=0A=
=0A=
distclean:	clean=0A=
		@$(RM) Makefile extconf.h conftest.* mkmf.log=0A=
		@$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)=0A=
=0A=
realclean:	distclean=0A=
install: $(RUBYARCHDIR)=0A=
install: $(RUBYARCHDIR)/$(DLLIB)=0A=
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB) $(RUBYARCHDIR)=0A=
	@$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)=0A=
install: $(RUBYLIBDIR)=0A=
install: $(RUBYLIBDIR)/oleproperty.rb=0A=
$(RUBYLIBDIR)/oleproperty.rb: $(srcdir)/lib/oleproperty.rb =
$(RUBYLIBDIR)=0A=
	@$(INSTALL_DATA) $(srcdir)/lib/oleproperty.rb $(RUBYLIBDIR)=0A=
$(RUBYARCHDIR):=0A=
	@$(MAKEDIRS) $(RUBYARCHDIR)=0A=
$(RUBYLIBDIR):=0A=
	@$(MAKEDIRS) $(RUBYLIBDIR)=0A=
=0A=
site-install: install=0A=
=0A=
.SUFFIXES: .c .cc .m .cxx .cpp .C .obj=0A=
=0A=
{$(srcdir)}.cc{}.obj:=0A=
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=3D/)=0A=
=0A=
.cc.obj:=0A=
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=3D/)=0A=
=0A=
{$(srcdir)}.cpp{}.obj:=0A=
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=3D/)=0A=
=0A=
.cpp.obj:=0A=
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=3D/)=0A=
=0A=
{$(srcdir)}.cxx{}.obj:=0A=
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=3D/)=0A=
=0A=
.cxx.obj:=0A=
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=3D/)=0A=
=0A=
{$(srcdir)}.C{}.obj:=0A=
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=3D/)=0A=
=0A=
.C.obj:=0A=
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=3D/)=0A=
=0A=
{$(srcdir)}.c{}.obj:=0A=
	$(CC) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=3D/)=0A=
=0A=
.c.obj:=0A=
	$(CC) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=3D/)=0A=
=0A=
$(DLLIB): $(OBJS)=0A=
	@-$(RM) $@=0A=
	@-$(RM) $(TARGET).lib=0A=
	$(LDSHARED) -Fe$(@) $(OBJS) $(LIBS) $(LOCAL_LIBS) $(DLDFLAGS)=0A=
=0A=
###=0A=
win32ole2.obj : $(hdrdir)/ruby.h $(hdrdir)/config.h =
$(hdrdir)/defines.h=0A=



#include "ruby.h"
static VALUE
fev_s_new(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
		char *pstr;
		printf("In WIN32OLE_EVENT.new\n");

		pstr = ALLOC_N(char, 11);
		printf("pstr = %8.8lx\n", pstr);
      printf("In WIN32OLE_EVENT.new 1\n");
		free(pstr);
		printf("In WIN32OLE_EVENT.new 2\n");
}

static VALUE dummy_method(VALUE self)
{
}

VALUE cWIN32OLE_EVENT;
void
Init_win32ole2()
{
	int i;
	char s[100];

    cWIN32OLE_EVENT = rb_define_class("WIN32OLE_EVENT", rb_cObject);
	 for (i = 0; i < 35; i++) {
		 sprintf(s, "default%d", i);
		 rb_define_method(cWIN32OLE_EVENT, s, dummy_method, 0);
	 }
    rb_define_singleton_method(cWIN32OLE_EVENT, "new", fev_s_new, -1);
}




EXPORTS=0A=
Init_win32ole2=0A=



require "win32ole2"

ev = WIN32OLE_EVENT.new()



In This Thread