From 0b816d116832a534b262e57d77401b838b826fb3 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Sun, 31 Jan 1999 06:36:26 +0000 Subject: [PATCH] Added some extra debug code and declared the creation method as an extern so I can use it in my debug code... --- mailnews/news/src/nsNNTPArticleList.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/mailnews/news/src/nsNNTPArticleList.cpp b/mailnews/news/src/nsNNTPArticleList.cpp index 2184e218011e..d3d8ed485b86 100644 --- a/mailnews/news/src/nsNNTPArticleList.cpp +++ b/mailnews/news/src/nsNNTPArticleList.cpp @@ -35,7 +35,6 @@ public: const nsINNTPNewsgroup* newsgroup); /* , MSG_Pane *pane); */ virtual ~nsNNTPArticleList(); - static void operator delete(void *); NS_DECL_ISUPPORTS // nsINNTPArticleKeysState @@ -107,7 +106,6 @@ nsNNTPArticleList::Init(const nsINNTPHost * newsHost, return NS_MSG_SUCCESS; } -#if 0 nsNNTPArticleList::~nsNNTPArticleList() { #ifdef HAVE_NEWSDB @@ -115,11 +113,17 @@ nsNNTPArticleList::~nsNNTPArticleList() m_newsDB->Close(); #endif } -#endif nsresult nsNNTPArticleList::AddArticleKey(PRInt32 key) { +#ifdef DEBUG_mscott + char * groupname = nsnull; + if (m_newsgroup) + m_newsgroup->GetName(&groupname); + printf("Adding article key %d for group %s.\n", key, groupname ? groupname : "unspecified"); + PR_FREEIF(groupname); +#endif m_idsOnServer.set->Add(key); #ifdef HAVE_IDARRAY if (m_dbIndex < m_idsInDB.GetSize()) @@ -158,6 +162,8 @@ nsNNTPArticleList::FinishAddingArticleKeys() return 0; } +extern "C" { + nsresult NS_NewArticleList(nsINNTPArticleList **articleList, const nsINNTPHost* newsHost, @@ -168,3 +174,5 @@ NS_NewArticleList(nsINNTPArticleList **articleList, return aArticleList->QueryInterface(nsINNTPArticleList::IID(), (void **)articleList); } + +} \ No newline at end of file